package cn.edu.sjtu.message_management.dto;

import cn.edu.sjtu.message_management.model.User;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Tolerate;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.List;

@Data
@Builder
public class MessageDTO {
    private String MessageId;
    private Integer type;
    private User fromUser;
    @NotBlank
    private String content;
    @NotBlank
    private String process;
    @NotBlank
    private String device;
    private Date time;
    @Valid
    private List<User> toUser;

    @Tolerate
    MessageDTO() {
    }
}
